package com.tc.dispatch.aa.ejb;

import java.util.*;
import javax.ejb.*;
import com.tc.dispatch.aa.util.*;
import com.tc.dispatch.aa.model.*;
import com.tc.dispatch.aa.dao.*;
import com.tc.dispatch.aa.exception.*;

public interface AA_DPServiceLocal extends EJBLocalObject
{

    public String createRole(AARoleValue role) throws AAException;
    public void removeRole(String role_id) throws AAException;
    public void updateRole(AARoleValue role) throws AAException;
    public AARoleValue getRole(String role_id) throws AAException;

    public String createUser(AAUserValue user) throws AAException;
    public void removeUser(String user_id) throws AAException;
    public void updateUser(AAUserValue user) throws AAException;
    public AAUserValue getUser(String user_id) throws AAException;
    public boolean checkUserIdAndPassword(String user_id, String password) throws AAException;
    public String checkUsernameAndPassword(String username, String password) throws AAException;

    public String createResource(AAResourceValue resource) throws AAException;
    public void removeResource(String resource_id) throws AAException;
    public void updateResource(AAResourceValue resource) throws AAException;
    public AAResourceValue getResource(String resource_id) throws AAException;
    public List findAllResourcePKs() throws AAException;

    public String createAction(AAActionValue action) throws AAException;
    public void removeAction(String action_id) throws AAException;
    public void updateAction(AAActionValue action) throws AAException;
    public AAActionValue getAction(String action_id) throws AAException;
    public List findAllActionPKs() throws AAException;

    public void setRelUserRole(String user_id, String role_id) throws AAException;
    public void revokeRelUserRole(String user_id, String role_id) throws AAException;
    public boolean isRelUserRoleExist(String user_id, String role_id) throws AAException;
    public List findRolePKsByUser(String user_id) throws AAException;
    public List findUserPKsByRole(String role_id) throws AAException;

    public void setRelRule(String role_id, String resource_id, String action_id, int permission) throws AAException;
    public void revokeRelRule(String role_id, String resource_id, String action_id) throws AAException;
    public boolean isRelRuleExist(String role_id, String resource_id, String action_id) throws AAException;
    public int getRelRule(String role_id, String resource_id, String action_id) throws AAException;
    public boolean checkRolePermission(String role_id, String resource_id, String action_id) throws AAException;
    public boolean checkUserPermission(String user_id, String resource_id, String action_id) throws AAException;
    public List findAllRolePKs() throws AAException;
    public List findAllUserPKs() throws AAException;
}




























